<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path;
%>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>${config.appName}插班生报名信息</title>
    <style media="print">
	  @page {
	   size: auto;
	   margin: 0mm;
	  }
	  body{
	  	height:auto !important;
	  }
  	</style>
  	<link href="<%=basePath %>/style/print.css" rel="stylesheet">
    <link rel="stylesheet" href="<%=basePath %>/style/weui.css"/>
    <link rel="stylesheet" href="<%=basePath %>/style/weui2.css"/>
    <link rel="stylesheet" href="<%=basePath %>/style/weui3.css"/>
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <script src="<%=basePath %>/js/zepto.min.js"></script>
<body ontouchstart style="background-color: #fff;">
<div class="weui_tab tab-bottom" id="sj" style="display:none;">
    <div class="weui_tab_bd pb0">
     <div class="weui-header bg-blue"> 
     <div class="weui-header-right"><a href="<%=basePath %>/signup/middleStudent" class="weui_btn weui_btn_mini weui_btn_primary bg-green">返回</a></div>
    	<h1 class="weui-header-title">
    		插班生报名资料
    	</h1>    
    </div>
        <form >
            <div class="weui_cells weui_cells_form mt0">
                <input type="hidden" name="signUpType" value="${signUpType }"/>
                <input type="hidden" name="id"/>
                <div class="weui_cell lblue">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p class="f-blue bold">学生基本资料</p>
                    </div>
                </div>
                <div class="weui_cell" style="padding-top:15px;">
                    <div class="weui_cell_hd"><label class="weui_label">学生姓名</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.studentName}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">学生性别</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.studentSex}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">民族</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.nation}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">出生日期</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.studentBirthday}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">身体状况</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.healthy}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">原就读学校</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.baseSchool}</p>
                    </div>
                </div>


                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">身份证号码</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.studentIdNo}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">籍贯</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.nativePlace}</p>
                    </div>
                </div>


                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">户籍所在地</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.houseSSQ}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">户口所在镇街</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.houseAddr}</p>
                    </div>
                </div>

                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">家庭住址</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.familyAddr}</p>
                    </div>
                </div>

                <div class="weui_cell lblue">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p class="f-blue bold">家庭主要成员资料</p>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">父亲姓名</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.fatherName}</p>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">父亲电话</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.fatherPhone}</p>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">父亲单位</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.fatherCompany}</p>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">母亲姓名</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.motherName}</p>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">母亲电话</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.motherPhone}</p>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">母亲单位</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.motherCompany}</p>
                    </div>
                </div>
                <div class="weui_cell lblue">
                    <div class="weui_cell_bd weui_cell_primary">
                        <p class="f-blue bold">就读方式</p>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">就读方式</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                    	<c:choose>
    						<c:when test="${singn.schoolStudyType == 1}">
    							<p>走读 (17:30放学)</p>
    						</c:when>
    						<c:when test="${singn.schoolStudyType == 2}">
    							<p>晚修后走读(20：00放学（一、二年级）20:30放学（三、四、五年级）)</p>
    						</c:when>  
    						<c:when test="${singn.schoolStudyType == 3}">
    							<p>住宿(周日19:00上学周五16:10放学)</p>
    						</c:when>                         		
                        </c:choose>
                    </div>
                </div>
                <div class="weui_cell">
                    <div class="weui_cell_hd"><label class="weui_label">是否参加学校开放日</label></div>
                    <div class="weui_cell_bd weui_cell_primary">
                        <p>${singn.isJoinOpenday}</p>
                    </div>
                </div>
            </div>
        </form>       
        <br/>
    </div>
</div>
<div id="dn">
	<div id="startPrint" onclick="startPrint()" style="display:block;">打印</div>
	<div id="pdgt" style="page-break-after:always;">
	  <!--startprint-->
	  <div style="width:1000px;margin:auto;page-break-after:always;">
    	<h1 style="text-align: center;padding-top:20px;" >培立实验小学新生报名表</h1>
	    <br>
	    <br>
	    <div class="class" align="center" style= "text-align: left;">
		  <table style="width:1080px;">
		  	<tr>
		  		<th><font size="5" >报名学校: 培立实验小学</font></th>
		  		<th><font size="5" >报名号: ${singn.signupNo }</font></th>
		  	</tr>
		  </table>
		  <br/>
	        <table class="table table-bordered cr" border="1">
			<tr>		    
	              <td colspan="8" align="center">   
	                     <h3><label>一、基本资料</label></h3>	  
	              </td>
		    </tr>
	        <tr>
	              <td width="13%" ><label >姓名</label></td>
	              <td width="12%">${singn.studentName }</td>
	              <td width="13%" ><label >性别</label></td>
	              <td width="12%">${singn.studentSex }</td>
	              <td width="13%" ><label >入读年级</label></td>
	              <td width="18%" colspan="2">${singn.signGrade }</td>
				  <td rowspan="3" width="19%">照片</td>
	         </tr>
			 <tr>
	              <td ><label >出生年月</label></td>
	              <td >${singn.studentBirthday }</td>
	              <td ><label >身体状况</label></td>
	              <td >${singn.healthy }</td>
	              <td ><label >原就读学校</label></td>
	              <td  colspan="2">${singn.baseSchool }</td>			 
	         </tr>
			  <tr> 
			      <td ><label >身份证号码</label></td>
				  <td colspan="2" style="text-align:left !important;">${singn.studentIdNo }</td>           
	              <td ><label >民族</label></td>
	              <td >${singn.nation }</td>
	              <td width="9%"><label >籍  贯</label></td>
	              <td width="9%">${singn.nativePlace }</td>					 
	         </tr>
			 <tr>
	              <td ><label >户籍所在地</label></td>
	              <td colspan="3" style="text-align:left !important;">${singn.houseSSQ }</td>
				  <td><label >户口所在镇街</label></td>
	              <td colspan="3" style="text-align:left !important;">${singn.houseAddr }</td>
	          </tr>
			  <tr>  
			  	<td> <label >家庭地址</label > </td>
			  	<td colspan="7" style="text-align:left !important;">${singn.familyAddr }</td>
			  </tr>
			  
			  
			  
			  <tr>		    
	              <td colspan="8" >   
	                     <h3><label > 二、家庭主要成员资料</label></h3>	  
	              </td>
		    </tr>
			 <tr>
	              <td ><label >关 系</label></td>
	              <td style="font-weight:bold"><label >姓 名</label></td>
	              <td colspan="3" ><label >工作单位</label></td>
	              <td colspan="2" ><label >手机</label></td>
	         </tr>
			 <tr><td>爸爸</td><td>${singn.fatherName }</td><td colspan="3">${singn.fatherCompany }</td><td colspan="2">${singn.fatherPhone }</td></tr>
			 <tr><td>妈妈</td><td>${singn.motherName }</td><td colspan="3">${singn.motherCompany }</td><td colspan="2">${singn.motherPhone }</td></tr>
	
			 <tr>		    
	              <td colspan="8">   
	                     <h3><label >  三、就读方式（请打√）</label></h3>	  
	              </td>
		    </tr>
	        <tr>
	              <td ><label >1. 走读</label></td>
	              <td >17:30放学</td>
	              <td colspan="2"><c:if test="${singn.schoolStudyType == 1}">√</c:if></td>
	              <td ><label >3.住宿</label></td>
	              <td colspan="2">周日19:00上学<br/>周五16:10放学</td>  
	              <td ><c:if test="${singn.schoolStudyType == 3}">√</c:if></td>	  
	         </tr>
			 <tr>
	              <td ><label >2.晚修后走读</label></td>
	              <td colspan="2">20：00放学<br/>（一年级）</td>
	              <td><c:if test="${singn.schoolStudyType == 2 && (fn:indexOf(singn.signGrade, '一年级') != -1)}">√</c:if></td>
	              <td colspan="3">20:30放学<br/>（二、三、四、五年级）</td>          
	              <td ><c:if test="${singn.schoolStudyType == 2 && (fn:indexOf(singn.signGrade, '二年级') != -1 || fn:indexOf(singn.signGrade, '三年级') != -1 || fn:indexOf(singn.signGrade, '四年级') != -1 || fn:indexOf(singn.signGrade, '五年级') != -1)}">√</c:if></td>	  
	         </tr>
	         
		  </table>
		  <br/>
		  <br/>
		  <br/>
		   <br/>
		  <table style="width:1080px;">
		  	<tr>
		  		<td><font size="5" >家长（监护人）签名                </font></td>
		  		<td><font size="5" >&emsp;&emsp;&emsp;年&emsp;&emsp;&emsp;&emsp;月&emsp;&emsp;&emsp;&emsp;日</font></td>
		  	</tr>
		  </table>
		</div>
	   </div>
	   <!--endprint-->
	</div>
</div>
<script>
	if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
	    document.getElementById("sj").style.display='block';
	    document.getElementById("dn").style.display='none';
	} else {	
	    document.getElementById("sj").style.display='none';
	    document.getElementById("dn").style.display='block';
	}
	function startPrint(){
		bdhtml=window.document.body.innerHTML;
	    sprnstr="<!--startprint-->"; //开始打印标识字符串有17个字符
	    eprnstr="<!--endprint-->"; //结束打印标识字符串
	    prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); //从开始打印标识之后的内容
	    prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); //截取开始标识和结束标识之间的内容
	    window.document.body.innerHTML=prnhtml; //把需要打印的指定内容赋给body.innerHTML
	    window.print(); //调用浏览器的打印功能打印指定区域
	    window.document.body.innerHTML=bdhtml; // 最后还原页面 
	}
</script>
</body>
</html>